package cn.HuanG.quartz.job;

import org.quartz.*;

import java.util.Date;

public class PrintTimeJob implements Job  {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //获取 定时任务的里面的参数
        JobDetail jobDetail = jobExecutionContext.getJobDetail();
        //获取 定时任务里面放数据的容器
        JobDataMap jobDataMap = jobDetail.getJobDataMap();
        //根据key获取数据
        Object msg = jobDataMap.get("msg");
        //具体的任务详情
        System.out.println(new Date()+":"+msg);


    }
}
